package com.shop2cn.iapi.agentproducts.testcase;

import com.shop2cn.iapi.agentproducts.service.GetProvincesCall;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.TestCase;
import com.ymt.utils.annotation.TestSuite;
import com.ymt.utils.tag.P1;
import org.junit.*;
import org.junit.experimental.categories.Category;
/**
*省份列表
*FreeMaker Template自动生成代码
*/
@TestSuite
public class Ts_GetProvinces{
	private static GetProvincesCall getprovincesCall;
	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("省份列表");
	}

	@Before
	public void caseUp() {
		getprovincesCall=new GetProvincesCall();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(getprovincesCall.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_GetProvinces_01() {
		Logger.start(true,"获取省份列表，成功");
		try {
			getprovincesCall.addHeader("ymt-pars","accesstoken=C73D22F7D46D767915F5F242E8D33853E112C14B8904A6AE559730333EF9D3573D244B59588F70E2BE7FDEE32326B219044BC1E17CF19372");
			getprovincesCall.callService();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
}